<?
die("oks");
//更新会员的推荐个数
set_time_limit(1000);

require_once("../config/dbconn.php");require_once("../config/powercls.php");


//更新会员的推荐人数
$sql="update {$db_prefix}users set tjnum=0 where 1";
$db->query($sql);

$sql="select * from {$db_prefix}users where 1";
$result=$db->query($sql);
if ($db->num_rows($result)==0) die("ok了");
while($rs=$db->fetch_array($result)){
	if ($rs['tjuser']){
		$sqlgx="update {$db_prefix}users set tjnum=tjnum+1 where username='".$rs['tjuser']."'";
		echo $sqlgx."<br>";
		$db->query($sqlgx);
	}
}
$db->free_result($result);

echo "ok";
exit();
?>